<?php
/**
 * The Template for displaying all single posts.
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */

get_header(); ?>

		<div id="container">
			<div id="content" role="main">
				<?php
					global $post;
					$cats = get_the_category($post->ID);				
				?>
				<div class="single-content <?php echo strtoupper($cats[0]->name); ?>">				
					<?php
					if(have_posts()) : while(have_posts()) : the_post();global $post;					
					?>	
					<div class="left-single-content">
						<p class="cat-list <?php echo strtoupper($cats[0]->name); ?>"><?php echo $cats[0]->name ; ?></p>
						<p class="thumbnail"><?php add_image_size('single_size', 55, 50, true); the_post_thumbnail('single_size',array('title'=>get_the_title($post->ID), 'alt'=>get_the_title($post->ID))) ; ?></p>
						<div class="post-description">
							<strong class="title">
								<?php echo get_post_meta($post->ID,'title_description_post',true) ; ?>
							</strong>
							<p class="content-description">
								<?php echo get_post_meta($post->ID,'description_world_view',true) ; ?>
							</p>
						</div>
					</div>
					<div class="main-single-content">
						<h1 class="post-title"><?php the_title() ; ?></h1>
						<div class="time-and-comment">
							<span class="date"><?php the_time('M d,Y ') ; ?> </span> <span class="time"><?php the_time('g:i a') ; ?></span>
							<span class='comments'><span class="number"><?php comments_number( '0', '1', '%' ) ; ?></span><span> comments</span></span>
						</div>
						<div class="post-content"><?php the_content() ; ?></div>
					</div>
					<div class="clear"></div>
					<?php comments_template( '', true ); ?>
					<?php
					
					endwhile;
					endif;
					?>
				</div>
				<div class="side-bar">
					<div id="tabs">
						<ul>
							<li class="first"><a href="#popular">POPULAR</a></li>
							<li style="margin-left:7px"><a href="#mostdiscussed">MOST DISCUSSED</a></li>
							<li><a href="#newest">NEW</a></li>
						</ul>
						<?php
							Hope_Custom_functions :: ppbv_display();
							Hope_Custom_functions :: show_mostdiscussed();
							Hope_Custom_functions :: show_newest();
						?>
					</div>
					<script type="text/javascript">
					jQuery(function() {
						jQuery( "#tabs" ).tabs();
					});
					</script>
				</div>
				<script type="text/javascript">
					jQuery(function(){
						jQuery( '.side-bar' ).height(jQuery('#main').height());
					})
				</script>
			</div><!-- #content -->
		</div><!-- #container -->
<?php get_footer(); ?>
